import 'package:flutter/material.dart';

class ListViewPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('list_view'),
        ),
        body: Container(
          height: 50,
          margin: EdgeInsets.only(top: 10),
          child: ListView.builder(
              itemCount: 50,
              scrollDirection: Axis.horizontal,
              itemBuilder: (context, int index) {
                return Container(
                    margin: EdgeInsets.symmetric(horizontal: 10),
                    width: 100,
                    child: ColoredBox(
                      color: Colors.primaries[index % Colors.primaries.length]
                          .withOpacity(0.5),
                      child: Center(
                        child: Text(
                          (index + 1).toString(),
                          style: const TextStyle(
                              color: Colors.white, fontSize: 20),
                          overflow: TextOverflow.clip,
                          softWrap: false,
                        ),
                      ),
                    ));
              }),
        ));
  }
}
